/* 群聊详情页面样式 */
.group-details-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f5f5f5;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* 状态栏样式 */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time {
  font-size: 16px;
  font-weight: 600;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.heart-icon {
  width: 16px;
  height: 16px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.network-icon {
  width: 20px;
  height: 12px;
  background-color: #4cd964;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #fff;
}

.battery {
  font-size: 14px;
  font-weight: 600;
}

/* 头部样式 */
.group-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #007aff;
  cursor: pointer;
  padding: px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #f0f0f0;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  margin: 0;
}

/* 群成员区域样式 */
.members-section {
  background-color: #fff;
  padding: 20px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.members-row {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding-bottom: 8px;
  width: 100%;
}

.member-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: calc((100% - 44px) / 5); /* 5个头像，减去4个gap的宽度 */
  max-width: 60px;
  min-width: 50px;
}

.action-buttons-row {
  display: flex;
  align-items: center;
  gap: 0 !important;
  margin-top: 8px;
  margin-left: 0;
  margin-right: 0;
  padding: 0;
  width: fit-content;
}

.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.default-avatar {
  width: 100%;
  height: 100%;
  background-color: #007aff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.member-name {
  font-size: 12px;
  color: #333;
  text-align: center;
  font-weight: 500;
  margin-top: 4px;
}

.add-member-btn,
.remove-member-btn {
  width: 50px !important;
  height: 50px !important;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0 !important;
  /* margin: 0 !important; */
  padding: 0 !important;
  box-sizing: border-box;
  margin-right: 25px;
}

.add-member-btn:hover,
.remove-member-btn:hover {
  border-color: #007aff;
  background-color: #f0f8ff;
}

.add-icon,
.remove-icon {
  font-size: 20px;
  color: #666;
  font-weight: bold;
}

/* 设置区域通用样式 */
.group-settings-section,
.chat-settings-section,
.user-group-settings-section {
  background-color: #fff;
  margin-top: 8px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.setting-item:hover {
  background-color: #f8f9fa;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 16px;
  color: #000;
  font-weight: 400;
}

.setting-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-text {
  font-size: 16px;
  color: #666;
}

.arrow {
  font-size: 18px;
  color: #ccc;
  font-weight: bold;
}

.qr-icon {
  font-size: 18px;
}

/* 开关样式 */
.toggle-switch {
  width: 50px;
  height: 30px;
  background-color: #e0e0e0;
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-switch.on {
  background-color: #4cd964;
}

.toggle-circle {
  width: 26px;
  height: 26px;
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.on .toggle-circle {
  transform: translateX(20px);
}

/* 底部指示器 */
.bottom-indicator {
  height: 2px;
  background-color: #000;
  margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .group-details-container {
    height: 100vh;
  }

  .status-bar {
    padding: 6px 12px;
    font-size: 12px;
  }

  .time {
    font-size: 14px;
  }

  .group-details-header {
    padding: 12px;
  }

  .header-title {
    font-size: 16px;
  }

  .members-section {
    padding: 16px 12px;
  }

  .member-avatar {
    width: 50px;
    height: 50px;
  }

  .add-member-btn,
  .remove-member-btn {
    width: 50px;
    height: 50px;
  }

  .setting-item {
    padding: 14px 12px;
  }

  .setting-label {
    font-size: 15px;
  }

  .setting-text {
    font-size: 15px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .group-details-container {
    background-color: #1c1c1e;
  }

  .group-details-header,
  .members-section,
  .group-settings-section,
  .chat-settings-section,
  .user-group-settings-section {
    background-color: #2c2c2e;
  }

  .header-title,
  .setting-label {
    color: #fff;
  }

  .setting-text {
    color: #8e8e93;
  }

  .setting-item {
    border-bottom-color: #3a3a3c;
  }

  .setting-item:hover {
    background-color: #3a3a3c;
  }
}
